<?php
/**
 * Created by PhpStorm.
 * User: 10037
 * Date: 2022/6/15
 * Time: 19:53
 */

namespace app\index\model;


use think\Model;

class Message extends Model
{
    protected $pk='id';

    public function addMessage($ip,$text){
        $data['userip']=$ip;
        $data['text']=$text;
        return $this->save($data);
    }

    public function selectIp($ip){
        return $this->where('userip','=',$ip)->count();
    }
}